list=[]
for i in range(1,1001):
    if i<=3:
        list.append(i)
    else:
        for j in range(2,i):
          if i%j==0:
            break
        else:
          list.append(i)
print(list)
